<template>
	<view>
		<u-tabs :list="list1" @click="click" lineWidth="30" lineColor="red" :current="currentIndex"></u-tabs>
		<block v-if="currentIndex==0">
			<view class="">
				待付款的内容
			</view>
		</block>
		<block v-if="currentIndex==1">
			<view class="">
				待收货的内容
			</view>
		</block>
		<block v-if="currentIndex==2">
			<view class="">
				待评价的内容
			</view>
		</block>
		<block v-if="currentIndex==3">
			<view class="">
				退换/售后的内容
			</view>
		</block>
		<block v-if="currentIndex==4">
			<view class="">
				我的订单的内容
			</view>
		</block>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list1: [{
					name: '待付款',
				}, {
					name: '待收货',
				}, {
					name: '待评价'
				}, {
					name: '退换/售后'
				}, {
					name: '我的订单'
				}],
				currentIndex: 0
			}
		},
		methods: {
			click(item) {
					uni.showLoading({
						title:'加载中',
					})
				setTimeout(()=>{
					uni.hideLoading()
					this.currentIndex = item.index
				},800)
				
			}
		},
		onLoad(options) {
			let {
				index
			} = options;
			console.log(index);
			this.currentIndex = index
		}
	}
</script>

<style>

</style>
